package com.ak.jddemo.test;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * @author: ak
 * @date: 2021/4/19 14:48
 * @description:
 */
@Service
@ConfigurationProperties(prefix = "jd.seckill")
@Data
public class TempConfig {
    public String pid;
    public String eid;
    public String fp;
    public String enabledProxy;
    public String proxyHost;
    public String enabledMultithreading;
    public Integer proxyPort;
    public String mac;

    @PostConstruct
    public void init(){
        System.out.println("初始化...");
        Config.eid = this.eid;
        Config.fp = this.fp;
        Config.enabledProxy = this.enabledProxy;
        Config.proxyHost = this.proxyHost;
        Config.proxyPort = this.proxyPort;
        Config.mac = this.mac;
    }
}
